package yijy.example;

/**
 * Created by yijy on 2017/7/21.
 */
public class TryThis {

    public static void tryTest(){
        try {
            System.out.println("1");
            problem();
        }catch (RuntimeException e){
            System.out.println("2");
            return;
        }catch (Exception e){
            System.out.println("3");
            return;
        }finally {
            System.out.println("4");
        }
        System.out.println(5);
    }

    public static void problem() throws Exception {
        throw new RuntimeException("problem() is null");
    }

    public static void main(String[] args) {
        tryTest();
    }
}
